From: Carlos Garnacho Date: Tue, 30 Sep 2025 14:09:47 +0000 (+0200) Subject: status/keyboard: Track ::layout-layout-group-changed for changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~80^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e8d73262;p=gnome-shell.git status/keyboard: Track ::layout-layout-group-changed for changes This may happen under the hood without UI interaction through modifiers expressed in xkb-options to switch to specific layouts. Make this actually have an effect in the UI bits, and update the selected layout if these changes happen without further GNOME Shell involvement. Part-of: --- diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index c4779d4eb..62f1e731d 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -380,6 +380,7 @@ export class InputSourceManager extends Signals.EventEmitter { this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this)); global.display.connect('modifiers-accelerator-activated', this._modifiersSwitcher.bind(this)); + global.backend.connect('keymap-layout-group-changed', this._layoutGroupChanged.bind(this)); this._sourcesPerWindow = false; this._focusWindowNotifyId = 0; @@ -428,6 +429,12 @@ export class InputSourceManager extends Signals.EventEmitter { return true; } + _layoutGroupChanged(backend, idx) { + const is = this._inputSources[idx]; + this._currentInputSourceChanged(is); + this._keyboardManager.apply(is.xkbId); + } + _switchInputSource(display, window, event, binding) { if (this._mruSources.length < 2) return;